package com.qj.travel.service.impl;

import com.qj.travel.db.dao.UserGroupDao;
import com.qj.travel.db.model.UserGroupModel;
import com.qj.travel.service.UserGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2016/10/15.
 */
@Service
public class UserGroupServiceImpl implements UserGroupService {

    @Autowired
    private UserGroupDao userGroupDao;

    public List<UserGroupModel> getGroup() {
        return userGroupDao.getGroup();
    }

    public int createGroup(String groupName) {
        return userGroupDao.createGroup(groupName);
    }

    public int deleteGroup(String groupName) {
        return userGroupDao.deleteGroup(groupName);
    }

    public int renameGroup(String groupNewName,String groupName) {
        return userGroupDao.renameGroup(groupNewName,groupName);
    }
}
